package com.hspedu.poly_.polyarr;

/**
 * @Author Stringzhua
 * @Date 2024/3/2 19:50
 * description:
 */
public class Student extends Person {
    private double score;

    //重写父类的say方法
    @Override
    public String say() {
        return "学生" + super.say() + "  score=" + score;
    }

    //学生的特有方法
    public void study() {
        System.out.println("学生" + getName() + "正在学java...");
    }

    public Student(String name, int age, double score) {
        super(name, age);
        this.score = score;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
